<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>沟通记录表 管理</title>
    <jsp:include page="../../import.jsp" flush="true"/>
</head>
<body class="iframeBody">

<div id="div_rsk_type_view">
    <form id="div_rsk_type_form_view">
        <div class="fieldset1 tabel_col tabel_col_s clearFix noBorder">

            <div class="fieldBox col_50">
                <div class="label" id="div_rsk_name_column_tip_view">客户名称</div>
                <div class="field">
                    ${rskCommRecVO.cstNm}
                </div>
            </div>
            <div class="fieldBox col_50">
                <div class="label" id="div_rsk_paytypcd_column_tip_view">还款方式</div>
                <div class="field">
                    ${rskCommRecVO.payTypCd}
                </div>
            </div>

            <div class="fieldBox col_50">
                <div class="label" id="div_rsk_lkman_column_tip_view">联系人</div>
                <div class="field">
                    ${rskCommRecVO.lkMan}
                </div>
            </div>

            <div class="fieldBox col_50">
                <div class="label" id="div_rsk_lkphone_column_tip_view">联系电话</div>
                <div class="field">
                    ${rskCommRecVO.lkPhone}
                </div>
            </div>

            <div class="fieldBox col_50">
                <div class="label" id="div_rsk_lkaddr_column_tip_view">联系地址</div>
                <div class="field">
                    ${rskCommRecVO.lkAddr}
                </div>
            </div>


            <div id="win_np_block_id_view" style="display:block">
                <div class="fieldBox col_50">
                    <div class="label">催收方式</div>
                    <div class="field">
                        ${rskCommRecVO.collectWayCdNm}
                    </div>
                </div>

                <div class="fieldBox col_50">
                    <div class="label">风险等级</div>
                    <div class="field">
                        ${rskCommRecVO.payWnCd}
                    </div>
                </div>
                <div class="fieldBox col_50">
                    <div class="label">贷前风险标记</div>
                    <div class="field">
                        ${rskCommRecVO.preLoanRskInfo}
                    </div>
                </div>

                <div class="fieldBox col_100">
                    <div class="label">逾期原因</div>
                    <div class="field">
                        ${rskCommRecVO.ovdReasonCdNm}
                    </div>
                </div>
                <div class="fieldBox col_50">
                    <div class="label" style="width: 155px">客户反馈受新型肺炎影响</div>
                    <div class="field">
                        ${rskCommRecVO.cstFeedbackCdNm}
                    </div>
                </div>
                <div class="fieldBox col_50">
                    <div class="label" style="width: 155px">公司审批受新型肺炎影响</div>
                    <div class="field">
                        ${rskCommRecVO.compFeedbackCdNm}
                    </div>
                </div>
            </div>

            <div class="fieldBox col_50">
                <div class="label">催收员</div>
                <div class="field">
                    ${rskCommRecVO.collectUsrNm}
                </div>
            </div>
            <div class="fieldBox col_50" id="winIsConnectDiv_view" style="display: none">
                <div class="label">接通状态</div>
                <div class="field">
                    ${rskCommRecVO.cntStsCdNm }
                </div>
            </div>
            <div class="fieldBox col_50" id="winLetterTypCdDiv_view" style="display: none">
                <div class="label">信函类型</div>
                <div class="field">
                    ${rskCommRecVO.letterTypCdNm}
                </div>
            </div>
            <div class="fieldBox col_50" id="letterSendResDiv" style="display: none">
                <div class="label">信函发送结果</div>
                <div class="field">
                    ${rskCommRecVO.letterSendResNm}
                </div>
            </div>
            <div class="fieldBox col_50" id="letterSendWayDiv" style="display: none">
                <div class="label">信函发送方式</div>
                <div class="field">
                    ${rskCommRecVO.letterSendWayNm}
                </div>
            </div>
            <div class="fieldBox col_50" id="expressNoDiv" style="display: none">
                <div class="label">快递单号</div>
                <div class="field">
                    ${rskCommRecVO.expressNo}
                </div>
            </div>
            <div class="fieldBox col_50" id="winVisitRstCdDiv_view" style="display: none">
                <div class="label">外访结果</div>
                <div class="field">
                        ${rskCommRecVO.visitRstCdNm}
                </div>
            </div>
            <div class="fieldBox col_50" id="isRealAdressDiv" style="display: none">
                <div class="label">地址真实性</div>
                <div class="field">
                    ${rskCommRecVO.isRealAdressNm}
                </div>
            </div>
            <div class="fieldBox col_50" id="realAdressDiv" style="display: none">
                <div class="label">真实地址</div>
                <div class="field">
                    ${rskCommRecVO.realAdress}
                </div>
            </div>

            <div id="winRlNmDiv_view" style="display: none">
                <div class="fieldBox col_50">
                    <div class="label">面谈人</div>
                    <div class="field">
                        ${rskCommRecVO.rlNm}
                    </div>
                </div>
            </div>

            <div class="fieldBox col_50" style="display:none" id="collectRstDiv">
                <div class="label">催收结果</div>
                <div class="field">
                    ${rskCommRecVO.collectRstCdNm}
                </div>
            </div>


            <div class="fieldBox col_50" id="collectRstDiv">
                <div class="label">渠道参与</div>
                <div class="field">
                    ${rskCommRecVO.participantNm}
                </div>
            </div>
        </div>

        <div class="fieldset1 tabel_col tabel_col_s clearFix noBorder">

            <div class="fieldBox col_100">
                <div class="label">催收详情</div>
                <div class="field">
                    <textarea name="winCollectRem_view" id="winCollectRem_view" rows="6" class="ui-textarea l-textarea" style="width:80%">${rskCommRecVO.collectRem}</textarea>
                    <span class="requiredSymbol">*</span>
                </div>
            </div>
            <div class="fieldBox col_100" id="fileModify">
                <div class="label">资料</div>
                <div class="field">
                    <jsp:include page="../../system/sysUlFilesRec/sysUlFileRecListDetail.jsp" flush="true" >
                        <jsp:param name="pkId" value="${rskCommRecVO.id }"/>
                        <jsp:param name="tabNm" value=""/>
                    </jsp:include>
                </div>
            </div>
        </div>
    </form>
</div>

<script>
    $(function () {
        $("#winlkManRl").text('${rskCommRecVO.lKTypCd}');//联系人关系
        var collectRstCd = '${rskCommRecVO.collectRstCd}';//催收结果
        var collectWayCd = '${rskCommRecVO.collectWayCd}';//催收方式
        var isConnect = '';
        var visitRstCd = '';
        $("#winAppoDt_view").val(renderDate('${rskCommRecVO.appoDt}'));//预约时间/承诺时间 ..
        // 催收方式为电话催收 展示接通状态
        if(collectWayCd == '1'){
            $("#winIsConnectDiv_view").css("display","block");
            // 接通状态为 接听 展示催收结果
            var cntStsCd = '${rskCommRecVO.cntStsCd}';//电话催收是否接通 0 否  1 是
            if(cntStsCd == '8'){
                $("#collectRstDiv").show();
            }else{
                $("#collectRstDiv").hide();
            }
        }else if(collectWayCd == '2'){
            // 催收方式为信函催收 展示信函类型 发送结果 邮寄方式
            // 邮寄方式为 邮寄 展示邮寄单号
            $("#winLetterTypCdDiv_view").show();
            $("#letterSendWayDiv").show();
            $("#letterSendResDiv").show();
            var sendWayCd = "${rskCommRecVO.letterSendWay}";
            if(sendWayCd=="2"){
                $("#expressNoDiv").show();
            }
        }else if(collectWayCd == '3'){
            var isRealAdress = "${rskCommRecVO.isRealAdress}"
            var realAdress = "${rskCommRecVO.realAdress}";
            if(isRealAdress=="2" && StringUtils.isNotEmpty(realAdress)){
                $("#realAdressDiv").show();
            }
            $("#isRealAdressDiv").show();
            $("#winVisitRstCdDiv_view").show();
            $("#winRlNmDiv_view").show();
        }
    });

    //格式化时间
    function renderDate(value) {
        var dateStr = "";
        if (null != value) {
            var date = new Date(value);
            dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DD);
        }
        return dateStr;
    }

</script>
</body>
</html>
